namespace Wechat.Service.Articles;

public interface IArticleService
{
    /// <summary>
    /// 从作者整理的合集文章下载其中的文章
    /// </summary>
    /// <param name="url"></param>
    /// <returns></returns>
    Task<string> SaveArticlesToHtmlFromCollectionArticleUrl(string url);

    Task<string> SaveArticleUrlFromCollectionArticleUrl(string url, string title);

    Task SaveArticleUrlFromCollectionArticleUrlNew(string url, string title);

    Task DownloadArticlesFromDb(string uniqueBiz);

    Task DownloadArticlesFromCollectionUrlAndTitle(string url, string title);

    Task<string> SaveArticlesToHtmlFromTopticUrl(string url);

    Task ConvertArticleUrlsToText();

    /// <summary>
    /// 通过topic界面的url获取所有的urls,是一个递归函数
    /// </summary>
    /// <param name="url"></param>
    /// <param name="albumId"></param>
    /// <param name="biz"></param>
    /// <returns></returns>
    Task RequestTopicUrlsByTopicUrl(string url, string albumId, string biz);

    /// <summary>
    /// 通过topic的url,生成请求tocpic的url
    /// </summary>
    /// <param name="biz"></param>
    /// <param name="albumdId"></param>
    /// <param name="newMid"></param>
    /// <returns></returns>
    string GenerateTopticRequestUrl(string? biz, string? albumdId, string? newMid, string? idx);

    /// <summary>
    /// 从作者整理的合集文章下载其中的文章
    /// </summary>
    /// <param name="url"></param>
    /// <returns></returns>
    void SaveArticlesToTxtFromCollectionArticleUrl(string url);

    /// <summary>
    /// 从作者整理的合集文章下载其中的文章
    /// </summary>
    /// <param name="url"></param>
    /// <returns></returns>
    void SaveArticlesToOneTxtFromCollectionArticleUrl(string url);

    Task FilterArticlesByBizFolderAsync(string biz);

    Task FilterArticlesByCollectionUrlAndTitleAsync(string url, string title);

    void ConvertArticlesToOneTextByBizWithFilter(string biz, string name);

    void ConvertArticlesToOneTextByBiz(string biz, string name);
    void ConvertArticlesToOneTextByCollectionUrlAndTitleAsync(string url, string title);

    void ConvertArticlesToOnePDFByCollectionUrlAndTitleAsync(string url, string title);

    Task DownloadArticlesFromByBiz(string biz);
    Task DownloadOriginalArticlesFromByBiz(string biz);

    Task GetArticleUrlsFromLocalAsync();
    Task GetArticleUrlsFromRequestAsync();

    Task FilterArticlesByBiz(string biz);
    Task MergerArticlesByBiz(string biz);
}
